Page({
  data: {
    visitList: []
  },
  onLoad() {
    this.getVisitorList()
  },
  // 获取访客列表页面请求
  async getVisitorList() {
    const res = await wx.$http.get('/visitor', {
      current: 1,
      pageSize: 10
    })

    console.log(res)
    this.setData({
      visitList: res.data.rows
    })
  },
  goPassport(e) {
    wx.navigateTo({
      url: '/visitor_pkg/pages/passport/index?id=' + e.mark.id,
    })
  },
})
